﻿
using System.Drawing;
namespace Minecraft_2D.Blocks
{
    class Wood : Bloc
    {
        #region Attributs
        #endregion

        #region Constructeur
        public Wood(int percent)
            : base("Wood", Properties.Resources.Wood, true, percent)
        {
        }
        #endregion

        #region Proprietes
        #endregion

        #region Methodes
        public override TypeBloc OnNew(Block bloc)
        {
            TypeBloc down = bloc.Bottom;
            if (down == TypeBloc.Grass ||
                down == TypeBloc.Dirt ||
                down == TypeBloc.Wood)
            {
                if (down == TypeBloc.Grass)
                    bloc.Bottom.Type = BlocSet.GetSingleton()[TypeBloc.Dirt].OnNew(bloc);
                return TypeBloc.Wood;
            }
            return bloc.Type;
        }
        #endregion
    }
}
